using System.ComponentModel.DataAnnotations;

namespace AiPlatformAdmin.Api.Models;

public class Tenant
{
    public int Id { get; set; }

    [Required]
    [MaxLength(100)]
    public string Name { get; set; } = string.Empty;

    [MaxLength(500)]
    public string? Description { get; set; }

    [Required]
    [MaxLength(50)]
    public string TenantKey { get; set; } = string.Empty; // Unique identifier for the tenant

    public bool IsActive { get; set; } = true;

    public DateTime CreatedAt { get; set; } = DateTime.UtcNow;

    public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;

    // Navigation properties
    public ICollection<User> Users { get; set; } = new List<User>();
    public ICollection<Team> Teams { get; set; } = new List<Team>();
    public ICollection<KnowledgeBase> KnowledgeBases { get; set; } = new List<KnowledgeBase>();
    public ICollection<Agent> Agents { get; set; } = new List<Agent>();
    public ICollection<Plugin> Plugins { get; set; } = new List<Plugin>();
}
